﻿// -----------------------------------------------------------------------------
// Generate By Furion Tools v3.0.6                            
// -----------------------------------------------------------------------------

using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using HOPU.OnlineSchool.Core;

namespace HOPU.OnlineSchool.Core
{
    public partial class StatisticsDaily : IEntity<MasterDbContextLocator>, IEntityTypeBuilder<StatisticsDaily, MasterDbContextLocator>
    {
    
        public string Id { get; set; }
        public string DateCalculated { get; set; }
        public int RegisterNum { get; set; }
        public int LoginNum { get; set; }
        public int VideoViewNum { get; set; }
        public int CourseNum { get; set; }
        public DateTime GmtCreate { get; set; }
        public DateTime GmtModified { get; set; }
    
        public void Configure(EntityTypeBuilder<StatisticsDaily> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
                entityBuilder.ToTable("statistics_daily");

                entityBuilder.HasComment("网站统计日数据");

                entityBuilder.HasIndex(e => e.DateCalculated, "statistics_day");

                entityBuilder.Property(e => e.Id)
                    .HasMaxLength(19)
                    .HasColumnName("id")
                    .IsFixedLength(true)
                    .HasComment("主键");

                entityBuilder.Property(e => e.CourseNum)
                    .HasColumnName("course_num")
                    .HasComment("每日新增课程数");

                entityBuilder.Property(e => e.DateCalculated)
                    .IsRequired()
                    .HasMaxLength(20)
                    .HasColumnName("date_calculated")
                    .HasComment("统计日期");

                entityBuilder.Property(e => e.GmtCreate)
                    .HasColumnName("gmt_create")
                    .HasComment("创建时间");

                entityBuilder.Property(e => e.GmtModified)
                    .HasColumnName("gmt_modified")
                    .HasComment("更新时间");

                entityBuilder.Property(e => e.LoginNum)
                    .HasColumnName("login_num")
                    .HasComment("登录人数");

                entityBuilder.Property(e => e.RegisterNum)
                    .HasColumnName("register_num")
                    .HasComment("注册人数");

                entityBuilder.Property(e => e.VideoViewNum)
                    .HasColumnName("video_view_num")
                    .HasComment("每日播放视频数");
        }

    }
}
